<template>
    <div class="member">
      <el-container>
        <el-header>
          <el-row>
            <el-col :span="4" class="title">欢迎! 我的店主大人</el-col>
          </el-row>
          <el-alert
              title="欢迎来到本店会员管理页面"
              type="success" style="height:30px;">
            </el-alert>
        </el-header>
        <el-main>
          <el-row style="margin-top: 30px; margin-bottom:30px">
            <el-col :span="6">
              <div>会员总数:500人</div>
            </el-col>
            <el-col :span="6">
              <div>有效会员:300人</div>
            </el-col>
            <el-col :span="6">
              <div>过期会员:200人</div>
            </el-col>
            <el-col :span="6">
              <div>超级会员:100人</div>
            </el-col>
          </el-row>
          <el-row type="flex" class="row-bg" justify="center" style="margin-top: 30px; margin-bottom:30px">
            <el-col :span="10">
              <el-progress :percentage="60" :format="format"></el-progress>
              <el-progress :percentage="20" :format="format" color="green"></el-progress>
              <el-progress :percentage="40"  :format="format" color="red"></el-progress>
            </el-col>
            <el-col :span="10">
              <el-progress type="circle" :percentage="60"></el-progress>
              <el-progress type="circle" :percentage="20" status="success"></el-progress>
              <el-progress type="circle" :percentage="40" status="warning"></el-progress>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-table
                :data="tableData"
                height="350"
                border
                style="width: 100%">
                <el-table-column
                  prop="date"
                  label="注册日期"
                  width="180">
                </el-table-column>
                <el-table-column
                  prop="account"
                  label="账号">
                </el-table-column>
                <el-table-column
                  prop="phoneNumber"
                  label="手机号码">
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="姓名"
                  width="180">
                </el-table-column>
                <el-table-column
                  prop="address"
                  label="地址">
                </el-table-column>
              </el-table>
            </el-col>
          </el-row>
        </el-main>
      </el-container>
    </div>
</template>
<script>
export default {
  name: 'member',
  data() {
    return {
      tableData: [{
          date: '2021.04.25',
          account: '1300152415',
          phoneNumber: '15626352698',
          name: '小虎',
          address: '广州市番禺区金山路12号'
        },
        {
          date: '2021.04.25',
          account: '1300152415',
          phoneNumber: '15626352698',
          name: '阿细',
          address: '广州市番禺区金山路12号'
        },
        {
          date: '2021.04.25',
          account: '1300152415',
          phoneNumber: '15626352698',
          name: '啊珊',
          address: '广州市番禺区金山路12号'
        },
        {
          date: '2021.04.25',
          account: '1300152415',
          phoneNumber: '15626352698',
          name: '宝雯',
          address: '广州市白云区山路12号'
        },
        {
          date: '2021.04.25',
          account: '1300152415',
          phoneNumber: '15626352698',
          name: '啊蛤',
          address: '阳江市江城区康泰路15号'
        }]
    }
  },
  methods: {
      format(percentage) {
        return percentage === 100 ? '满' : `${percentage}%`;
      }
    }
}
</script>
<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
    margin-bottom: ;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    height: auto;
  }
  .title {
    font-size: 24px;
    font-weight: 800;
  }
</style>
